#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
/*
int judge(char* s1, char* s2, int len)
{
	int i = 0;
	for (i = 1; i <= len; i++)
	{
		char tem = *s1;
		int j = 0;
		for (j=0; j<len; j++)
		{
			*(s1 + j) = *(s1 + j + 1);
		}
		*(s1 + j) = tem;
	}
	if (strcmp(s1, s2) == 0)
	{
		return 1;
	}
}
int main()
{
	char s1[] = "AABCD";
	char s2[] = "BCDAA";
	int len = strlen(s1);
	if (judge(s1, s2, len))
	{
		printf("find it\n");
	}
	else
	{
		printf("Not find it\n");
	}
	return 0;
}
*/
int check(char* s1, char* s2)
{
	if (strlen(s1) != strlen(s2))
	{
		return 0;
	}
	strncat(s1, s2, strlen(s1));
	{
		return strstr(s1, s2) != NULL;
	}
}
int main()
{
	char s1[20] = "AABCD";
	char s2[20] = "BCDAA";
	int len = strlen(s1);
	if (check(s1, s2, len))
	{
		printf("find it\n");
	}
	else
	{
		printf("Not find it\n");
	}
	return 0;
}